import { useRouter } from 'vue-router'

export function useOpen() {
    const router = useRouter()

    function openNewWindow(path: string, query = {}, desc = '_blank') {
        const { href } = router.resolve({ path, query })
        window.open(href, desc)
    }

    return { openNewWindow }
}
